This directory contains all the materials necessary to replicate the results in Ying's "Military Power and Ideological Appeals of Religious Extremists."



*** Directory Structure ***

1. Datasets Folder:
- This folder contains data for replicating the results in both the article and appendix.
- Files prefixed with "0_" are raw data sourced either from established databases or collected specifically for this study. They are used for pre-processing but are not directly required for replication purposes.
- Files prefixed with "1_" are used directly to generate the tables and figures.

2. Code Folder:
- This folder contains all the code required to replicate the empirical results. Specifically:
-- study1_magazine_dataprep_not_needed_for_replication.R: Prepares violence data from the UCDP-GED and GTD databases using the meltt R package. This file is not required directly for replication purposes.
-- study1_magazine_analysis.R: Code to replicate all magazine-related results except for Figures 2, 3, and A8.
-- study1_magazine_figure2.R: Code to replicate Figure 2.
-- study1_magazine_figure3.R: Code to replicate Figure 3.
-- study1_magazine_figureA8.do: Code to replicate Figure A8.
-- study2_twitter_analysis.R: Code to replicate all Twitter-related results.

3. Codebook Folder:
- Contains codebooks for the datasets.

4. Output Plots Folder:
- This folder includes all the figures in the paper and appendix, which can be generated directly using the replication code.



*** List of Empirical Results and Corresponding Replication Code: ***

1. Main Paper:
- Figure 1: Not a quantitative result, consists of screenshots or diagrams.
- Figure 2: study1_magazine_figure2.R
- Figure 3: study1_magazine_figure3.R
- Table 1: study1_magazine_analysis.R
- Table 2: study1_magazine_analysis.R
- Table 3: study1_magazine_analysis.R
- Table 4: study2_twitter_analysis.R

2. Appendix:
- Figures A1 to A13: Not quantitative results, consisting of screenshots or diagrams.
- Figure A8: study1_magazine_figureA8.do
- Figure A14: study1_magazine_analysis.R

- Table A1: study1_magazine_analysis.R
- Tables A2 to A3: Not quantitative results, consisting of screenshots or diagrams.
- Table A4: study1_magazine_analysis.R
- Table A5: study2_twitter_analysis.R
- Tables A6 to A7: study1_magazine_analysis.R
- Table A8: study2_twitter_analysis.R
- Tables A9 to A14: study1_magazine_analysis.R
- Tables A15 to A18: study2_twitter_analysis.R
- Tables A19 to A20: study1_magazine_analysis.R



*** System Information ***
Operation system: MacOS Sonoma 14.4.1
R version: 4.0.3 (2020-10-10)
Stata version: 18.0